import request from '@/utils/request'
//考试管理接口
export function testExamQuery(data) {
  //分页列表
  return request({
    method: 'get',
    url: '/testExam/query',
    params: data,
  })
}

export function testExamQueryById(id) {
  //查询
  return request({
    method: 'get',
    url: '/testExam/query/' + id,
  })
}

export function testExamAdd(data) {
  //添加
  return request({
    method: 'post',
    url: '/testExam/add',
    data,
  })
}

export function testExamDelete(id) {
  //删除
  return request({
    method: 'get',
    url: '/testExam/delete/' + id,
  })
}

export function testExamUpdate(data) {
  //修改
  return request({
    method: 'post',
    url: '/testExam/update',
    data,
  })
}

export function testExamQueryMyExam(data) {
  //分页列表
  return request({
    method: 'get',
    url: '/testExam/queryMyExam',
    params: data,
  })
}

export function testExamGeneratePaper(id) {
  //生成试卷
  return request({
    method: 'get',
    url: '/testExam/generatePaper/' + id,
  })
}

export function testExamSubmitPaper(data) {
  //修改
  return request({
    method: 'post',
    url: '/testExam/submitPaper',
    data,
  })
}

export function testExamHisQuery(data) {
  //历史考试卷信息分页列表
  return request({
    method: 'get',
    url: '/testExamHis/query',
    params: data,
  })
}

export function testExamHisQueryById(id) {
  //查询一条历史考试卷信息
  return request({
    method: 'get',
    url: '/testExamHis/query/' + id,
  })
}

export function testExamHisAddError(data) {
  //
  return request({
    method: 'post',
    url: '/testExamHis/addError',
    data,
  })
}

export function testExamValidExamById(id) {
  //验证考试
  return request({
    method: 'get',
    url: '/testExam/validExam/' + id,
  })
}

export function testExamHisReviewPaperByExamId(id, data) {
  //修改分数
  return request({
    method: 'post',
    url: '/testExamHis/reviewPaper/' + id,
    data,
  })
}
